-- GENERATED SPELL FOR [Ahn'kahar Spell Flinger] --


function spell0_30278(pUnit, Event) --@Shadow Blast,n/a--
pUnit:FullCastSpellOnTarget(56698,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30278', 6000, 1)
end

function spell1_30278(pUnit, Event) --@Shadow Blast,n/a--
pUnit:FullCastSpellOnTarget(59102,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30278', 6000, 1)
end

function spell2_30278(pUnit, Event) --@Shadow Sickle,Self--
pUnit:FullCastSpellOnTarget(56702,pUnit)
pUnit:RegisterEvent('Sorts_30278', 6000, 1)
end

function spell3_30278(pUnit, Event) --@Shadow Sickle,Self--
pUnit:FullCastSpellOnTarget(59103,pUnit)
pUnit:RegisterEvent('Sorts_30278', 6000, 1)
end

function Sorts_30278(pUnit, Event)
local choix_sorts_30278 = math.random(0, 3)
if choix_sorts_30278 == 0 then
pUnit:RegisterEvent('spell0_30278', 1, 1)
end
if choix_sorts_30278 == 1 then
pUnit:RegisterEvent('spell1_30278', 1, 1)
end
if choix_sorts_30278 == 2 then
pUnit:RegisterEvent('spell2_30278', 1, 1)
end
if choix_sorts_30278 == 3 then
pUnit:RegisterEvent('spell3_30278', 1, 1)
end
end

function mob30278_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30278', math.random(1500, 3000), 1)
end

function mob30278_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30278_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30278_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30278, 1, 'mob30278_Action')
RegisterUnitEvent(30278, 2, 'mob30278_Leave')
RegisterUnitEvent(30278, 3, 'mob30278_Kill')
RegisterUnitEvent(30278, 4, 'mob30278_Die')
